package tcu.se.testing.mockito;

        import java.util.List;
        import java.util.stream.Collectors;

public class MovieLister {
    MovieFinder finder;

    MovieLister(MovieFinder finder) {
        this.finder = finder;
    }
    List<String> movieNamesDirectedBy(String director) {
        return finder.findAll().stream()
                .filter(movie -> movie.isDirectedBy(director))
                .map(Movie ::getName)
                .collect(Collectors.toList());
    }

}
